﻿using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XiaF.Ioc
{
    public class Exception
    {

        //
        // 摘要:
        //     Throws an System.InvalidOperationException when the System.IServiceProvider property
        //     is used before initialization.
        [DoesNotReturn]
        public static void ThrowInvalidOperationExceptionForMissingInitialization()
        {
            throw new InvalidOperationException("The service provider has not been configured yet.");
        }

        //
        // 摘要:
        //     Throws an System.InvalidOperationException when the System.IServiceProvider property
        //     is missing a type registration.
        [DoesNotReturn]
        public static void ThrowInvalidOperationExceptionForUnregisteredType()
        {
            throw new InvalidOperationException("The requested service type was not registered.");
        }

        //
        // 摘要:
        //     Throws an System.InvalidOperationException when a configuration is attempted
        //     more than once.
        [DoesNotReturn]
        public static void ThrowInvalidOperationExceptionForRepeatedConfiguration()
        {
            throw new InvalidOperationException("The default service provider has already been configured.");
        }
    }
}
